<?php 
  require(dirname(__FILE__)."/global.php");
  require(ROOT."/admin/isLogin.php");
  
  $submit = $_POST['submit'];
  if(isset($submit)){
      $dels = $_POST['del'];
      foreach($dels as $del){
          if($_SESSION['user']['id'] == $del) continue;
          $sql = "delete from talking_user where UserID=".$del;
          $db->execute($sql);
      }
      $smarty->assign('tip','提交成功'); 
  }
  $sql = "SELECT * FROM talking_user,talking_group WHERE UserGroup = GroupID AND UserGroup NOT IN('1','2','3')";                                    
  $users = $db->query($sql);
  $smarty->assign('users',$users);
  $smarty->display("user.html");
  $db->close();
?>
